﻿using System.Windows.Controls;
using 添加页面显示.ViewModels;
using 添加页面显示.Views;

namespace 添加页面显示;

/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : PrismApplication
{
    protected override void RegisterTypes(IContainerRegistry containerRegistry)
    {
        //从容器中提取regionManager对象
        var regionManager = Container.Resolve<IRegionManager>();
        //默认导航到登录页面
        //regionManager.RequestNavigate("ContentRegion", "BitOperation");

        //注册MainUiModule项目中的视图  
        containerRegistry.RegisterForNavigation<MainWindow, MainViewModel>();
        containerRegistry.RegisterForNavigation<BitOperation, BitOperationViewModel>();
        containerRegistry.RegisterForNavigation<BubbleSort, BubbleSortViewModel>();

        base.OnInitialized();
    }

    protected override Window CreateShell()
    {
        //显示主窗口
        return Container.Resolve<MainWindow>();
    }
}

